package com.sleep.ws.server.config;

import com.sleep.ws.server.WsServer;
import com.sleep.ws.server.domain.WsServerProperties;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;

/**
 * @author Sleep-6000
 * @date 2024/3/21
 */
@AutoConfiguration
@EnableConfigurationProperties(WsServerProperties.class)
public class WsServerAutoConfiguration {

    @Bean
    public WsServer nettyServer(WsServerProperties wsServerProperties) {
        return new WsServer(wsServerProperties);
    }

}
